home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1989 / Jun 89 / V0043-Re Shrinking Menus-Jun89 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.2 KB  |  53 lines  |  [TEXT/GEOL]

  1. Item    3240841                         15-June-89        10:57
  2.  
  3. From:   MOOF                            Rollin, Keith A, APL
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    Re- Shrinking Menus
  8.  
  9. Ed,
  10.  
  11. The problem you have noticed with shrinking menus is a bug with MacApp 2.0ß5.
  12. It will be fixed in the next release of MacApp. If you need to have a working
  13. version now, the fix involved changing TPopup.AdjustBotRight:
  14.  
  15. PROCEDURE TPopup.AdjustBotRight;
  16.  
  17.     VAR
  18.         numItems:            INTEGER;
  19.         newHeight:            INTEGER;
  20.         newWidth:            INTEGER;
  21.         savedPort:            GrafPtr;
  22.         theFontInfo:        FontInfo;
  23.  
  24.     BEGIN
  25.     IF fMenuHandle <> NIL THEN
  26.         BEGIN
  27.         CalcMenuSize(fMenuHandle);
  28.         numItems := CountMItems(fMenuHandle);
  29.         newWidth := fMenuHandle^^.menuWidth + fItemOffset + fInset.left +
  30. fInset.right + 3;
  31.  
  32.         GetPort(savedPort);
  33.         SetPort(gWorkPort);
  34.         SetPortTextStyle(gSystemStyle);
  35.         GetFontInfo(theFontInfo);
  36.         SetPort(savedPort);
  37.  
  38.         WITH theFontInfo DO
  39.             newHeight := ascent + descent + leading + fInset.top + fInset.bottom + 3;
  40.  
  41.         Resize(newWidth, newHeight, kDontRedraw);
  42.         END;
  43.     END;
  44.  
  45.  
  46. Sorry about the missing TABs; they are still there, but AppleLink doesn't show
  47. them. Hope this helps!
  48.  
  49. - Keith Rollin
  50. - Apple Developer Technical Support
  51.  
  52.  
  53.